/*
 *    Copyright © OpenAtom Foundation.
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */

package com.inspur.edp.bff.core.action;

import com.inspur.edp.bef.api.lcp.AuthInfo;
import com.inspur.edp.bef.api.parameter.retrieve.RetrieveParam;
import com.inspur.edp.bff.core.action.cancel.CancelAction;
import com.inspur.edp.bff.core.action.delete.DeleteAction;
import com.inspur.edp.bff.core.action.delete.DeleteAndSaveAction;
import com.inspur.edp.bff.core.action.delete.DeleteChildAction;
import com.inspur.edp.bff.core.action.delete.MultiDeleteAction;
import com.inspur.edp.bff.core.action.modify.ModifyAction;
import com.inspur.edp.bff.core.action.query.QoQueryAction;
import com.inspur.edp.bff.core.action.query.QueryAction;
import com.inspur.edp.bff.core.action.query.QueryChildAction;
import com.inspur.edp.bff.core.action.query.QueryChildWithCodeAction;
import com.inspur.edp.bff.core.action.query.QueryWithAuthInfoAction;
import com.inspur.edp.bff.core.action.retrieve.EditAction;
import com.inspur.edp.bff.core.action.retrieve.MultiRetrieveAction;
import com.inspur.edp.bff.core.action.retrieve.RetrieveAction;
import com.inspur.edp.bff.core.action.retrieve.RetrieveChildAction;
import com.inspur.edp.bff.core.action.retrieve.RetrieveChildAndChildAction;
import com.inspur.edp.bff.core.action.retrieve.RetrieveChildByIndexAction;
import com.inspur.edp.bff.core.action.retrieve.RetrieveWithChildPaginationAction;
import com.inspur.edp.bff.core.action.retrievedefault.MulitRetrieveDefaultWtihDefaultValueAction;
import com.inspur.edp.bff.core.action.retrievedefault.RetrieveDefaultAction;
import com.inspur.edp.bff.core.action.retrievedefault.RetrieveDefaultBatchAction;
import com.inspur.edp.bff.core.action.retrievedefault.RetrieveDefaultChildAction;
import com.inspur.edp.bff.core.action.retrievedefault.RetrieveDefaultChildWithDefaultValueAtion;
import com.inspur.edp.bff.core.action.retrievedefault.RetrieveDefaultChildWithDefaultValueBatchAtion;
import com.inspur.edp.bff.core.action.retrievedefault.RetrieveDefaultChildeWithIdsAction;
import com.inspur.edp.bff.core.action.save.SaveAction;
import com.inspur.edp.bff.entity.RetrieveDefaultParam;
import com.inspur.edp.bff.entity.defaultvalue.VoDefaultValue;
import com.inspur.edp.cef.entity.changeset.IChangeDetail;
import com.inspur.edp.cef.entity.condition.EntityFilter;
import com.inspur.edp.cef.entity.dependenceTemp.Pagination;
import com.inspur.edp.cef.entity.entity.IEntityData;

import java.util.ArrayList;
import java.util.List;

public class FSActionFactory {
    static void TTT() {
    }

    public static RetrieveDefaultAction getRetrieveDefaultAction() {
        return new RetrieveDefaultAction();
    }

    public static RetrieveDefaultAction getRetrieveDefaultAction(VoDefaultValue defaultValue) {
        return new RetrieveDefaultAction(defaultValue);
    }

    public static RetrieveDefaultAction getRetrieveDefaultAction(String dataId) {
        return new RetrieveDefaultAction(dataId);
    }

    public static RetrieveDefaultBatchAction getRetrieveDefaultBatchAction(RetrieveDefaultParam defaultParam) {
        return new RetrieveDefaultBatchAction(defaultParam);
    }

    public static RetrieveDefaultChildAction getRetrieveDefaultChildAction(ArrayList<String> nodeCodes, ArrayList<String> lierachyIds) {
        return new RetrieveDefaultChildAction(nodeCodes, lierachyIds);
    }

    public static RetrieveDefaultChildeWithIdsAction getRetrieveDefaultChildWithIdsAction(ArrayList<String> nodeCodes, ArrayList<String> lierachyIds, ArrayList<String> ids) {

        return new RetrieveDefaultChildeWithIdsAction(nodeCodes, lierachyIds, ids);

    }

    public static MultiRetrieveAction getMultiRetrieveAction(ArrayList<String> dataIds, RetrieveParam param) {
        return new MultiRetrieveAction(dataIds, param);
    }

    public static RetrieveAction getRetrieveAction(String dataID) {
        return new RetrieveAction(dataID);
    }

    public static RetrieveAction getRetrieveAction(String dataId, RetrieveParam param) {
        return new RetrieveAction(dataId, param);
    }

    public static RetrieveChildAction getRetrieveChildAction(ArrayList<String> nodeCodes, ArrayList<String> lierachyIds, RetrieveParam retrieveParam) {
        return new RetrieveChildAction(nodeCodes, lierachyIds, retrieveParam);
    }

    public static RetrieveChildAndChildAction getRetrieveChildAndChildAction(ArrayList<String> nodeCodes, ArrayList<String> lierachyIds, ArrayList<String> ids, RetrieveParam retrieveParam) {
        return new RetrieveChildAndChildAction(nodeCodes, lierachyIds, ids, retrieveParam);
    }

    public static EditAction getEditAction(String dataId) {
        return new EditAction(dataId);
    }

    public static ModifyAction getModifyAction(IChangeDetail change) {
        return new ModifyAction(change);
    }

    public static QueryAction getQueryAction(EntityFilter filter) {
        return new QueryAction(filter);
    }


    public static QueryChildAction getQueryChildAction(List<String> nodeCodes, EntityFilter filter) {
        return new QueryChildAction(nodeCodes, filter);
    }


    public static QueryChildWithCodeAction getQueryChildWithCodeAction(String nodeCode, EntityFilter filter) {
        return new QueryChildWithCodeAction(nodeCode, filter);
    }

    public static QueryWithAuthInfoAction getQueryWithAuthInfoAction(EntityFilter filter, AuthInfo authInfo) {
        return new QueryWithAuthInfoAction(filter, authInfo);
    }

    public static QoQueryAction getQoQueryAction(IEntityData param, Pagination pageInfo, String extendCond) {
        return new QoQueryAction(param, pageInfo, extendCond);
    }

    public static DeleteAction getDeleteAction(String dataID) {
        return new DeleteAction(dataID);
    }

    public static MultiDeleteAction getMultiDeleteAction(ArrayList<String> dataIds) {
        return new MultiDeleteAction(dataIds);
    }

    public static DeleteAndSaveAction getDeleteAndSaveAction(String dataID) {
        return new DeleteAndSaveAction(dataID);
    }

    public static DeleteChildAction getDeleteChildAction(List<String> nodeCodes, List<String> hierachyIdList, List<String> ids) {
        return new DeleteChildAction(nodeCodes, hierachyIdList, ids);
    }

    public static SaveAction getSaveAction() {
        return new SaveAction();
    }

    public static CancelAction getCancelAction() {
        return new CancelAction();
    }

    public static RetrieveWithChildPaginationAction getRetrieveWithChildPagination(
            String dataId,
            com.inspur.edp.bff.api.param.retrieve.RetrieveParam param) {
        return new RetrieveWithChildPaginationAction(dataId, param);
    }

    public static RetrieveChildByIndexAction getRetrieveChildByIndexAction(
            ArrayList<String> nodeCodes,
            ArrayList<String> hierachyIds, Pagination pagination) {
        return new RetrieveChildByIndexAction(nodeCodes, hierachyIds, pagination);
    }

    public static MulitRetrieveDefaultWtihDefaultValueAction getMulitRetrieveDefaultWtihDefaultValueAction(
            ArrayList<String> nodeCodes, ArrayList<String> lierachyIds, ArrayList<VoDefaultValue> defaultValues) {
        return new MulitRetrieveDefaultWtihDefaultValueAction(nodeCodes, lierachyIds, defaultValues);
    }

    public static RetrieveDefaultChildWithDefaultValueAtion getRetrieveDefaultChildWithDefaultValueAction(
            ArrayList<String> nodeCodes, ArrayList<String> lierachyIds, VoDefaultValue defaultValue) {
        return new RetrieveDefaultChildWithDefaultValueAtion(nodeCodes, lierachyIds, defaultValue);
    }

    public static RetrieveDefaultChildWithDefaultValueBatchAtion getRetrieveDefaultChildWithDefaultValueBatchAction(
            ArrayList<String> nodeCodes, ArrayList<String> lierachyIds, RetrieveDefaultParam param) {
        return new RetrieveDefaultChildWithDefaultValueBatchAtion(nodeCodes, lierachyIds, param);
    }
}
